<!doctype html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>
<script>
////////////////////////////////////////////////////////////////////////////////
//
//  ElasticChrome
//
//  Copyright (c) 2010 Andrey Kurdiumov, All Rights Reserved
//  Maintainer: kant2002@gmail.com
//  Source code for this work could be obtained from: http://code.google.com/p/elastic-chrome
//  
//  License: GPL v3
// 
//  This file is part of ElasticChrome.
//  
//  ElasticChrome is free software: you can redistribute it and/or modify
//  it under the terms of the GNU General Public License as published by
//  the Free Software Foundation, either version 3 of the License, or
//  (at your option) any later version.
//  
//  ElasticChrome is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU General Public License for more details.
//  
//  You should have received a copy of the GNU General Public License
//  along with ElasticChrome.  If not, see <http://www.gnu.org/licenses/>.
// 
////////////////////////////////////////////////////////////////////////////////

function save() {
  var prefs = JSON.parse(localStorage.prefs);
  prefs.use_notifications = $("#notifications").attr('checked');
  
  localStorage.prefs = JSON.stringify(prefs);
}

// Make sure the checkbox checked state gets properly initialized from the
// saved preference.
$(function() {
  var prefs = JSON.parse(localStorage.prefs);
  $("#notifications").attr('checked', prefs.use_notifications);

  $("#button_save").bind('click', save);
});

</script>
</head>
<body>
<h2>Options for Elastic Chrome</h2>
<br/>
<a href="option_manage_accounts.html">Manage Accounts</a> 
<br>
Use desktop notifications: <input id="notifications" type="checkbox">

<button id="button_save">Save</button>
</body>
</html>
